//
// Copyright (C) 2013 OpenSim Ltd.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.
//

#ifndef __INET_INEIGHBORCACHE_H
#define __INET_INEIGHBORCACHE_H

#include "inet/physicallayer/wireless/common/contract/packetlevel/IRadio.h"

namespace inet {

namespace physicallayer {

/**
 * This interface keeps track of neighbor relationships between radios.
 */
class INET_API INeighborCache : public IPrintableObject
{
  public:
    virtual void addRadio(const IRadio *radio) = 0;

    virtual void removeRadio(const IRadio *radio) = 0;

    /**
     * Sends the provided frame (using the radio medium) to all neighbors within
     * the given range.
     */
    virtual void sendToNeighbors(IRadio *transmitter, const IWirelessSignal *signal, double range) const = 0;
};

} // namespace physicallayer

} // namespace inet

#endif

